<%@page contentType="text/html" pageEncoding="windows-1252"%>
<%@page import="java.sql.SQLException"%>
<%@page import="startup.model.user.Administrator"%>
<%
	try
	{
		Administrator administrator = ( Administrator )session.getAttribute( "currentSessionUser" );
		administrator.nameOfAdmin();
%>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="windows-1252">
		<title>Administrator</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<!-- Le styles -->
		<link href="styles/bootstrap.css" rel="stylesheet">
		<style type="text/css">
			body {
				padding-top: 60px;
				padding-bottom: 40px;
			}
			.sidebar-nav {
				padding: 9px 0;
			}
		</style>
	</head>
	<body>
        <!--Barra Superiore-->
        <div class="navbar navbar-fixed-top">
			<div class="navbar-inner">
				<div class="container-fluid">
					<a class="brand" href="#">Administrator : <%= administrator.getSurname() %> <%= administrator.getName() %></a>
					<div class="nav pull-right">
						<ul class="nav">
							<li>
								<form action="Logout" method="post">
									<button class="btn btn-primary btn-small">Sign out</button>
								</form>
							</li>
						</ul>
					</div>
				</div>
			</div>
        </div>
		<!--CONTENUTO LISTE -->
		<div class="container-fluid">
			<div class="row-fluid">
				<div class="span3" style="position: fixed;">
					<div class="well sidebar-nav">
						<ul class="nav nav-list">   
							<li class="nav-header">Location</li>
							<li class="active"><a href="#"><i class="icon-white icon-home"></i> Home</a></li>
							<li class="nav-header">Functions</li>
							<li class="active"><a href="#"><i class="icon-white icon-search"></i> Search</a></li>
							<li><a href="administratorFAQ.jsp"><i class="icon-info-sign"></i> F.A.Q.</a></li>
						</ul>
					</div><!--/.well -->
				</div><!--/span-->
				<div class="span9" style="margin-left: 26%;">
					<div class="hero-unit">
						<h1>Search for Students<br /><br /></h1>
						<form action="administratorSimilarStudent.jsp" method="post">
							<p>Insert the name of the student wich you want to search: <br />
								<input name="name" type="text" /><br />
								<button class="btn btn-primary btn-large">Search</button><br />
							</p>
						</form>
					</div>
				</div>
			</div>
        </div><!--/.fluid-container-->
        <div class="navbarCC navbar-fixed-bottom">
            <div class="navbarCC-inner">
                <div class="container-fluid">				
                    <a class="brand" href="#">&copy; 2012 Startup</a>					
                </div>
            </div>
        </div>
		<!-- Il javascript -->
		<script src="js/jquery.js"></script>
		<script src="js/bootstrap.js"></script>
	</body>
</html>
<%
	}
	catch( SQLException sqlException )
	{
		sqlException = new SQLException( "The database is currently busy.<br />" +
										 "If the problem persists, please report it to the administration." );
		request.setAttribute( "exception", sqlException );
		request.getRequestDispatcher( "errorPage.jsp" ).forward( request, response );
	}
	catch( RuntimeException runtimeException )
	{
		if( runtimeException.getClass().equals( NullPointerException.class ) )
		{
			runtimeException = new NullPointerException( "The session has timed out:<br />" + "" +
														 "try reloading page.<br />" +
														 "If the problem persists, please report it to the administration." );
		}
		request.setAttribute( "exception", runtimeException );
		request.getRequestDispatcher( "errorPage.jsp" ).forward( request, response );
	}
%>